package com.lsc.study.enumtest;

public enum ResponseEnum {

    /* 状态  */
    SUCCESS("200"),

    ERROR("500"),

    NotFound("404"),

    REJECT("403");

    String valueType;

    ResponseEnum(String valueType) {
        this.valueType = valueType;
    }

    public static void main(String[] args) {

        /* 如何 获取，枚举中的所有的值  */
        ResponseEnum[] values = ResponseEnum.values();
        System.out.println(values);

        for (ResponseEnum value : values) {
            System.out.println(value);
        }
        ResponseEnum success = ResponseEnum.SUCCESS;

        switch (success) {
            case SUCCESS:
                System.out.println("成功");
                break;

        }
    }
}
